// JavaScript Document
/*! Copyright 2014 Baidu Inc. All Rights Reserved. */ ;
(function () {
    var l = void 0,
        m = !0,
        o = null,
        q = !1,
        s = "BAIDU_DUP_require",
        u = "BAIDU_DUP_define",
        v = ["search!"],
        w = 3,
        y = document,
        z = {}, A = 0,
        B = 1,
        C = 2,
        D = 3,
        E = 4,
        F = 5;

    function G(a) {
        var d = H(a),
            c = d[0],
            d = d[1];
        this.id = a;
        this.name = d;
        this.uri = I(d);
        this.ha = !d;
        this.status = A;
        c && d && (this.la = J(K(c + "!")) || {
            load: function () {}
        });
        this.o = []
    }
    var Q = window[s] || function (a, d, c) {
            L(a, function () {
                for (var b = [], e = 0; e < a.length; e++) b[e] = J(K(a[e]));
                P(d) && d.apply(window, b)
            }, c)
        };

    function L(a, d, c) {
        var b = a.length;
        if (0 === b) d();
        else
            for (var e = b, f = 0; f < b; f++)(function (a) {
                function i() {
                    if (a.status < C) b();
                    else {
                        for (var i = a.o, f = [], e = 0; e < i.length; e++) {
                            var t = i[e];
                            t && K(t).status < D && f.push(t)
                        }
                        0 === f.length ? b() : L(f, b, c)
                    }
                }

                function b() {
                    a && a.status < D && (a.status = D);
                    0 === --e && d()
                }
                var f = a.la;
                f && (f.normalize && (a.name = f.normalize(a.name, I)), f.name2url && (a.uri = f.name2url(a.name)));
                a.status < C ? f && P(f.load) ? f.load(a.name, Q, function (i) {
                    R(a.id, [], function () {
                        return i
                    });
                    b()
                }) : S(a, i, c) : i()
            })(K(a[f]))
    }
    var T = {}, U = {}, V = {};

    function S(a, d, c) {
        a.status = B;
        V[a.id] ? d() : U[a.id] ? T[a.id].push(d) : (U[a.id] = m, T[a.id] = [d], c ? (d = a.uri, a = y.createElement("script"), a.charset = "utf-8", a.async = m, a.src = d, d = y.getElementsByTagName("head")[0] || y.body, d.insertBefore(a, d.firstChild)) : y.write('<script charset="utf-8" src="' + a.uri + '"><\/script>'))
    }
    var R = window[u] || function (a, d, c) {
            var b = K(a);
            b.status < C && (b.o = d, b.factory = c, b.status = b.ha ? D : C);
            if (U[a]) {
                delete U[a];
                V[a] = m;
                d = T[a];
                for (delete T[a]; a = d.shift();) a()
            }
        };

    function J(a) {
        if (!a) return o;
        if (a.status >= E) return a.I;
        if (a.status < D && a.I === l) return o;
        a.status = E;
        for (var d = [], c = 0; c < a.o.length; c++) d[c] = J(K(a.o[c]));
        var b = c = a.factory;
        P(c) && (b = c.apply(window, d));
        a.status = F;
        return a.I = b
    }

    function I(a) {
        return /^https?:\/\//.test(a) ? a : "http://dup.baidustatic.com/painter/" + a + ".js"
    }

    function K(a) {
        return z[a] || (z[a] = new G(a))
    }

    function H(a) {
        var d, c = a ? a.indexOf("!") : -1; - 1 < c && (d = a.slice(0, c), a = a.slice(c + 1, a.length));
        return [d, a]
    }

    function P(a) {
        return "[object Function]" === Object.prototype.toString.call(a)
    }
    R("util/lang", [], function () {
        function a(a) {
            for (var b = {}, e = "Array Boolean Date Error Function Number RegExp String".split(" "), f = 0, d = e.length; f < d; f++) b["[object " + e[f] + "]"] = e[f].toLowerCase();
            return a == o ? "null" : b[Object.prototype.toString.call(a)] || "object"
        }
        var d = Object.prototype.hasOwnProperty;
        return {
            A: d,
            b: a,
            getAttribute: function (a, b) {
                for (var e = a, f = b.split("."); f.length;) {
                    if (e === l || e === o) return;
                    e = e[f.shift()]
                }
                return e
            },
            O: function (c) {
                if ("object" !== a(c)) return "";
                var b = [],
                    e;
                for (e in c) d.call(c, e) && b.push(e +
                    "=" + encodeURIComponent(c[e]));
                return b.join("&")
            },
            i: function (d) {
                var b = [];
                switch (a(d)) {
                case "object":
                    b = Array.prototype.slice.call(d);
                    break;
                case "array":
                    b = d;
                    break;
                case "number":
                case "string":
                    b.push(d)
                }
                return b
            },
            unique: function (a) {
                for (var b = [], e = {}, f = a.length, d = 0; d < f; d++) {
                    var i = a[d];
                    e[i] || (b[b.length] = i, e[i] = m)
                }
                return b
            },
            removeItem: function (a, b) {
                for (var e = [].slice.call(a), f = e.length - 1; 0 <= f; f--) e[f] === b && e.splice(f, 1);
                return e
            },
            M: function () {}
        }
    });
    R("util/browser", ["util/lang"], function (a) {
        var d = {}, c = navigator.userAgent,
            b = window.RegExp;
        /msie (\d+\.\d)/i.test(c) && (d.u = document.documentMode || +b.$1);
        /opera\/(\d+\.\d)/i.test(c) && (d.opera = +b.$1);
        /firefox\/(\d+\.\d)/i.test(c) && (d.ta = +b.$1);
        /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(c) && !/chrome/i.test(c) && (d.Fa = +(b.$1 || b.$2));
        if (/chrome\/(\d+\.\d)/i.test(c)) {
            d.V = +b.$1;
            var e;
            try {
                e = "scoped" in document.createElement("style")
            } catch (f) {
                e = q
            }
            e && (d.qa = m)
        }
        try {
            /(\d+\.\d)/.test(a.getAttribute(window,
                "external.max_version")) && (d.Ca = +b.$1)
        } catch (g) {}
        a = "Android iPad iPhone Linux Macintosh Windows".split(" ");
        b = "";
        for (e = 0; e < a.length && !(b = a[e], c.match(RegExp(b.toLowerCase(), "i"))); e++);
        d.platform = b;
        return d
    });
    R("util/dom", ["util/lang"], function (a) {
        function d(a) {
            try {
                if (a && "object" === typeof a && a.document && "setInterval" in a) return m
            } catch (b) {}
            return q
        }

        function c(a, b) {
            b = 2 === arguments.length ? b : a.parent;
            return a != b || !d(a)
        }

        function b(a) {
            return 9 === a.nodeType ? a : a.ownerDocument || a.document
        }
        return {
            c: function (b, f) {
                return "string" === a.b(b) ? (f || window).document.getElementById(b) : b.nodeName && (1 === b.nodeType || 9 === b.nodeType) ? b : o
            },
            ia: d,
            l: c,
            k: function (a, b) {
                for (var b = 2 === arguments.length ? b : a.parent, d = 0; 10 > d++ && c(a, b);) {
                    var i;
                    try {
                        i = !! a.parent.location.toString()
                    } catch (n) {
                        i = q
                    }
                    if (!i) return m;
                    a = a.parent
                }
                return 10 <= d ? m : q
            },
            $: b,
            t: function (a) {
                a = b(a);
                return a.parentWindow || a.defaultView || o
            },
            n: function (a) {
                a = d(a) ? a.document : b(a);
                return "CSS1Compat" === a.compatMode ? a.documentElement : a.body
            }
        }
    });
    R("util/style", ["util/lang", "util/dom", "util/browser"], function (a, d, c) {
        function b(a, b) {
            if (!a) return "";
            var f = "",
                f = -1 < b.indexOf("-") ? b.replace(/[-][^-]{1}/g, function (a) {
                    return a.charAt(1).toUpperCase()
                }) : b.replace(/[A-Z]{1}/g, function (a) {
                    return "-" + a.charAt(0).toLowerCase()
                }),
                c = d.t(a);
            if (c && c.getComputedStyle) {
                if (c = c.getComputedStyle(a, o)) return c.getPropertyValue(b) || c.getPropertyValue(f)
            } else if (a.currentStyle) return c = a.currentStyle, c[b] || c[f];
            return ""
        }

        function e(a) {
            var f = {
                top: 0,
                left: 0
            };
            if (a === d.n(a)) return f;
            var c = d.$(a),
                e = c.body,
                c = c.documentElement;
            a.getBoundingClientRect && (a = a.getBoundingClientRect(), f.left = Math.floor(a.left) + Math.max(c.scrollLeft, e.scrollLeft), f.top = Math.floor(a.top) + Math.max(c.scrollTop, e.scrollTop), f.left -= c.clientLeft, f.top -= c.clientTop, a = b(e, "borderLeftWidth"), e = b(e, "borderTopWidth"), a = parseInt(a, 10), e = parseInt(e, 10), f.left -= isNaN(a) ? 2 : a, f.top -= isNaN(e) ? 2 : e);
            return f
        }

        function f(a, f) {
            var d = b(a, "margin" + f).toString().toLowerCase().replace("px", "").replace("auto", "0");
            return parseInt(d,
                10) || 0
        }

        function g(b) {
            for (var f = d.t(b), e = 100; b && b.tagName;) {
                var g = 100;
                if (c.u) {
                    if (5 < c.u) try {
                        g = parseInt(a.getAttribute(b, "filters.alpha.opacity"), 10) || 100
                    } catch (k) {}
                    e = e > g ? g : e
                } else {
                    try {
                        g = 100 * (f.getComputedStyle(b, o).opacity || 1)
                    } catch (p) {}
                    e *= g / 100
                }
                b = b.parentNode
            }
            return 0 === e ? 0 : e || 100
        }
        return {
            Aa: b,
            za: e,
            z: function (a) {
                var b = d.c(a);
                if (!b) return q;
                a = e(b);
                b = d.t(b);
                if (!b) return a;
                for (var f = 0; b !== b.parent && 10 > f++ && !d.k(b) && b.frameElement;) {
                    var c = e(b.frameElement);
                    a.left += c.left;
                    a.top += c.top;
                    b = b.parent
                }
                return a
            },
            ua: f,
            ya: function (a, b) {
                var c = d.c(a),
                    e = c.offsetWidth;
                b && (e += f(c, "Left") + f(c, "Right"));
                return e
            },
            xa: function (a, b) {
                var c = d.c(a),
                    e = c.offsetHeight;
                b && (e += f(c, "Top") + f(c, "Bottom"));
                return e
            },
            wa: g,
            va: function (a) {
                for (var b = d.c(a), a = d.t(b), b = g(b), f = 0; 10 > f++ && d.l(a) && !d.k(a);) {
                    var c = a.frameElement ? g(a.frameElement) : 100,
                        b = b * (c / 100);
                    a = a.parent
                }
                return b
            },
            ea: function (a) {
                return d.n(a || window).scrollWidth || -1
            },
            da: function (a) {
                return d.n(a || window).scrollHeight || -1
            },
            r: function (a) {
                return d.n(a || window).clientWidth || -1
            },
            q: function (a) {
                return d.n(a || window).clientHeight || -1
            }
        }
    });
    R("util/event", ["util/dom"], function (a) {
        return {
            bind: function (d, c, b) {
                if (d = a.ia(d) ? d : a.c(d))
                    if (d.addEventListener) d.addEventListener(c, b, q);
                    else if (d.attachEvent) d.attachEvent("on" + c, b);
                else {
                    var e = d["on" + c];
                    d["on" + c] = function () {
                        e && e.apply(this, arguments);
                        b.apply(this, arguments)
                    }
                }
                return d
            }
        }
    });
    R("util/cookie", ["util/lang"], function (a) {
        return {
            get: function (a, c) {
                var b = RegExp("(^| )" + a + "=([^;]*)(;|$)").exec(document.cookie);
                return b ? c ? decodeURIComponent(b[2]) : b[2] : ""
            },
            set: function (d, c, b, e) {
                var f = b.expires;
                "number" === a.b(f) && (f = new Date, f.setTime(+f + b.expires));
                document.cookie = d + "=" + (e ? encodeURIComponent(c) : c) + (b.path ? "; path=" + b.path : "") + (f ? "; expires=" + f.toGMTString() : "") + (b.domain ? "; domain=" + b.domain : "")
            }
        }
    });
    R("util/data", ["util/lang"], function (a) {
        function d(b, c) {
            var d = c;
            switch (a.b(b)) {
                default: d = q;
                break;
            case "string":
                var n = b.split(".");
                if (1 < n.length)
                    for (var h = e; n.length;) {
                        var j = n.shift();
                        h[j] = n.length ? h[j] ? h[j] : {} : c;
                        h = h[j]
                    } else e[b] = c
            }
            return d
        }

        function c(b) {
            var c = q;
            switch (a.b(b)) {
            case "string":
                c = a.getAttribute(e, b)
            }
            return c
        }

        function b(a, b, i) {
            if (!a || !b) return q;
            var e = c(a) || {};
            switch (i) {
            case "+1":
                i = e[b] || 0;
                e[b] = ++i;
                break;
            default:
                e[b] = parseInt(i, 10)
            }
            d(a, e);
            return e[b]
        }
        var e = {};
        return {
            j: function (a, b) {
                var c =
                    window;
                return c[a] ? c[a] : c[a] = b
            },
            K: function (a) {
                var b = window,
                    c = b[a];
                b[a] = l;
                return c
            },
            B: d,
            g: c,
            G: function (a, c) {
                return b(a, c, "+1")
            },
            Da: function (a, c, d) {
                return b(a, c, d)
            },
            count: b,
            Z: function (a, b) {
                return !a || !b ? q : (c(a) || {})[b] || 0
            },
            pa: function (a, b) {
                if (!a || !b) return q;
                var e = c("pageConfig") || {};
                e[a] = b;
                d("pageConfig", e);
                return m
            },
            Y: function (a) {
                return !a ? q : (c("pageConfig") || {})[a]
            }
        }
    });
    R("util/storage", [], function () {
        function a(a, d, f) {
            if (c) try {
                c.setItem(a, f ? encodeURIComponent(d) : d)
            } catch (g) {}
        }

        function d(a, d) {
            if (c) {
                var f = c.getItem(a);
                return d && f ? decodeURIComponent(f) : f
            }
            return o
        }
        var c = window.localStorage;
        return {
            T: function () {
                var b = q;
                try {
                    c.removeItem("BAIDU_DUP_storage_available"), a("BAIDU_DUP_storage_available", "1"), d("BAIDU_DUP_storage_available") && (b = m), c.removeItem("BAIDU_DUP_storage_available")
                } catch (e) {}
                return b
            },
            setItem: a,
            getItem: d,
            R: function (b, e, f) {
                if (c) {
                    e = f ? encodeURIComponent(e) :
                        e;
                    f = d(b) || "";
                    try {
                        a(b, f + ((f && "|") + e))
                    } catch (g) {}
                }
            },
            Q: function (b, e, f) {
                if (c)
                    if (e = f ? encodeURIComponent(e) : e, f = d(b) || "", f = f.replace(RegExp(e + "\\|?", "g"), "").replace(/\|$/, "")) try {
                        a(b, f)
                    } catch (g) {} else c.removeItem(b)
            }
        }
    });
    R("util/log", ["util/lang", "util/event", "util/storage"], function (a, d, c) {
        function b(a, b) {
            var c = new Image,
                d = "BAIDU_DUP_log_" + Math.floor(2147483648 * Math.random()).toString(36);
            window[d] = c;
            c.onload = c.onerror = c.onabort = function () {
                c.onload = c.onerror = c.onabort = o;
                c = window[d] = o;
                b && b(e, a, m)
            };
            c.src = a
        }
        var e = "BAIDU_DUP_log_storage";
        return {
            Ba: b,
            Ea: function () {
                var a = c.getItem(e);
                if (a)
                    for (var a = a.split("|"), d = 0, i = a.length; d < i; d++) b(decodeURIComponent(a[d]), c.Q)
            },
            C: function (f) {
                var f = "object" === a.b(f) ? f : {}, g = f.url ||
                        "http://cbjslog.baidu.com/log",
                    i = f.option || "now",
                    f = a.O(f.data || {}),
                    g = g + ((0 <= g.indexOf("?") ? "&" : "?") + f + (f ? "&" : "") + "rdm=" + +new Date);
                switch (i) {
                case "now":
                    b(g);
                    break;
                case "block":
                    break;
                default:
                    c.R(e, g, m), d.bind(window, "unload", function () {
                        b(g, c.Q)
                    })
                }
            }
        }
    });
    R("util", "util/lang,util/dom,util/style,util/event,util/cookie,util/data,util/storage,util/log,util/browser".split(","), function (a, d, c, b, e, f, g, i, n) {
        return {
            lang: a,
            a: d,
            style: c,
            event: b,
            cookie: e,
            data: f,
            Ga: g,
            log: i,
            U: n
        }
    });
    R("biz", ["util"], function (a) {
        function d(a) {
            var b = {}, c = "",
                e = window;
            try {
                c = e.top.location.search, "string" !== typeof c && (c = e.location.search)
            } catch (f) {
                c = e.location.search
            }
            c = c || "";
            0 === c.indexOf("?") && (c = c.substring(1));
            c = c.split("&");
            for (e = 0; e < c.length; e++) {
                var k = c[e].split("=");
                b[k[0]] = k[1]
            }
            d = function (a) {
                return b[a]
            };
            return b[a]
        }

        function c(b, c) {
            var d = /^[0-9a-zA-Z]+$/;
            return !b || !d.test(b) || !c ? [] : c = "array" === a.lang.b(c) ? c : Array.prototype.slice.call(arguments, 1)
        }

        function b(b, c, d) {
            if (!c || !c.length) return q;
            var d = d || {
                F: q,
                L: q,
                N: q
            }, h = d.L ? a.data.g(e) : {}, j = d.F ? f : e,
                h = d.N ? {} : a.data.g(j) || h,
                d = {}, k;
            for (k in h) a.lang.A.call(h, k) && (d[k] = "array" === a.lang.b(h[k]) ? h[k].slice() : h[k]);
            var h = d[b] || [],
                p = c.length;
            for (k = 0; k < p; k++) {
                var t = c[k];
                "string" === typeof t && (t = encodeURIComponent(t), 100 >= t.length && (h[h.length] = t))
            }
            if (!h.length) return q;
            d[b] = a.lang.unique(h);
            a.data.B(j, d);
            return m
        }
        var e = "bizOrientations",
            f = "bizUrgentOrientations";
        return {
            ca: d,
            H: function (a, d) {
                var e = c.apply(this, arguments);
                return b(a, e)
            },
            S: function (a,
                d) {
                var e = c.apply(this, arguments);
                return b(a, e, {
                    F: m,
                    L: m
                })
            },
            ra: function (a, d) {
                var e = c.apply(this, arguments);
                return b(a, e, {
                    F: m,
                    N: m
                })
            },
            ba: function (b) {
                var b = Math.max(0, Math.min(b || 500, 500)),
                    c = [],
                    d = a.data.g(f) || a.data.g(e) || {};
                if ("object" === a.lang.b(d))
                    for (var h in d) a.lang.A.call(d, h) && (c[c.length] = h + "=" + d[h].join(","));
                a.data.B(f, l);
                c.sort(function (a, b) {
                    return a.length - b.length
                });
                d = "";
                h = c.length;
                for (var j = 0; j < h && !(d.length + c[j].length >= b); j++) d += (j ? "&" : "") + c[j];
                return d
            }
        }
    });
    R("preview", ["biz"], function (a) {
        function d() {
            var c = a.ca,
                b = c("baidu_clb_preview_sid") || c("baidu_dup_preview_sid"),
                d = c("baidu_clb_preview_mid") || c("baidu_dup_preview_mid"),
                f = c("baidu_clb_preview_vc") || c("baidu_dup_preview_vc"),
                c = +c("baidu_clb_preview_ts") || +c("baidu_dup_preview_ts");
            return 3E4 >= +new Date - c ? {
                P: b,
                ja: d,
                sa: f
            } : o
        }
        return {
            fa: function (a) {
                var b = [],
                    e = d();
                e && a == e.P && (b.push("mid=" + e.ja), b.push("sid=" + e.sa));
                return b.join("&")
            },
            g: d
        }
    });
    R("slot", ["util"], function (a) {
        function d() {
            for (var a = {
                response: {},
                holder: "",
                stack: [],
                errors: [],
                status: {}
            }, b = n.length - 1; 0 <= b; b--) a.status[n[b]] = 0;
            return a
        }

        function c(a, b) {
            var c = q;
            "fillAsync" === b && (c = m);
            k[a] && -1 !== k[a].stack.join(" ").toLowerCase().indexOf("async") && (c = m);
            return c
        }

        function b(a, b) {
            if (!a) return "";
            var c = p + a;
            b && (c += "_" + b);
            return c
        }

        function e(a, b, c) {
            if (!a || !b) return q;
            c === l && (c = +new Date);
            return k[a] ? (k[a].status[b] = c, m) : q
        }

        function f(a, b) {
            g(a, "errors", b)
        }

        function g(b, c, d) {
            b && c && d && (b = k[b]) &&
                "array" === a.lang.b(b[c]) && b[c].push(d)
        }

        function i(a) {
            return !a ? k : k[a] || q
        }
        var n = "add,create,request,response,render,finish".split(","),
            h = [],
            j = {}, k = {}, p = "BAIDU_DUP_wrapper_";
        return {
            add: function () {
                var b = {
                    ids: [],
                    preloadIds: []
                }, c = a.lang.i(arguments);
                if (!c.length) return b;
                for (var c = c.join(",").split(","), f = [], g = [], p = c.length, n = 0; n < p; n++) {
                    var r = c[n];
                    if (j.hasOwnProperty(r)) {
                        var N = r + "_" + j[r],
                            x = i(N).stack || [];
                        if ("preload" === x[x.length - 1]) {
                            b.preloadIds.push(N);
                            continue
                        }
                        j[r] += 1
                    } else j[r] = 0;
                    r = r + "_" + j[r];
                    k[r] = new d;
                    e(r, "add");
                    g.push(r);
                    f.push(r)
                }
                h = h.concat(g);
                b.ids = f;
                return b
            },
            create: function (d, M, i) {
                if (!d || !M) return q;
                var h = b(d),
                    g = m;
                if (a.a.c(h)) return k[d].holder = h, g;
                if (c(d, M)) {
                    i = i || "";
                    k[d].holder = i;
                    i = a.a.c(i);
                    try {
                        i && (i.innerHTML = '<div id="' + h + '"></div>', k[d].holder = h)
                    } catch (j) {
                        f(d, "Failed to insert wrapper"), g = q
                    }
                } else if (document.write('<div id="' + h + '"></div>'), !a.a.c(h)) try {
                    var n = document.getElementsByTagName("script"),
                        p = n[n.length - 1];
                    if (p) {
                        var x = p.parentNode;
                        if (x) {
                            var O = document.createElement("div");
                            O.id =
                                b(d, "b");
                            x.insertBefore(O, p)
                        }
                    }
                } catch (W) {
                    f(d, "Failed to create backup wrapper")
                }
                e(d, "create");
                return g
            },
            W: c,
            aa: function (a) {
                return c(a) ? "async" : "sync"
            },
            J: function (c) {
                return !c ? "" : (c = a.a.c(k[c].holder) || a.a.c(b(c)) || a.a.c(b(c, "b"))) && c.id || ""
            },
            s: i,
            D: function (a, b) {
                if (!a || !b) return q;
                return k[a] ? (k[a].response = b, e(a, "response"), m) : q
            },
            m: e,
            h: f,
            v: function (a, b) {
                g(a, "stack", b)
            },
            w: function (b) {
                b = a.lang.i(b);
                if (!b.length) return q;
                var c = [],
                    d = {}, e;
                for (e = 0; e < h.length; e++) d[h[e]] = e + 1;
                for (e = 0; e < b.length; e++) {
                    var f =
                        d["" + b[e]];
                    f === l && (f = 0);
                    c.push(f)
                }
                return c
            },
            z: function (c) {
                c = a.lang.i(c);
                if (!c.length) return ["-1x-1"];
                for (var d = [], e = 0; e < c.length; e++) {
                    var i = c[e],
                        h;
                    try {
                        var g = a.a.c(b(i)) || a.a.c(b(i, "b"));
                        if (g) {
                            var j = a.style.z(g);
                            j && (h = [j.top, j.left])
                        }
                    } catch (k) {
                        f(i, "Unable to get ps")
                    }
                    h = h ? h : [-1, -1];
                    d.push(h.join("x"))
                }
                return d
            }
        }
    });
    R("api", ["slot", "util"], function (a, d) {
        return {
            getDai: a.w,
            getSlots: a.s,
            getFillType: a.aa,
            getFillWrapperId: a.J,
            setStatus: a.m,
            addErrorItem: a.h,
            addStackItem: a.v,
            bind: d.event.bind,
            getType: d.lang.b,
            sendLog: d.log.C,
            putInfo: d.data.B,
            getInfo: d.data.g,
            defineOnce: d.data.j,
            addCount: d.data.G,
            getCount: d.data.Z,
            getConfig: d.data.Y
        }
    });
    R("param", ["slot", "preview", "biz", "util"], function (a, d, c, b) {
        function e(a, b) {
            for (var b = b || 0, c = [], d = 0, e = a.length; d < e; d++) c.push(a[d].split("_")[b]);
            return c.join(",")
        }

        function f(a) {
            a = a || window.document.domain;
            0 === a.indexOf("www.") && (a = a.substr(4));
            "." === a.charAt(a.length - 1) && (a = a.substring(0, a.length - 1));
            var b = a.match(RegExp("([a-z0-9][a-z0-9\\-]*?\\.(?:com|cn|net|org|gov|info|la|cc|co|jp|us|hk|tv|me|biz|in|be|io|tk|cm|li|ru|ws|hn|fm|tw|ma|in|vn|name|mx|gd|im)(?:\\.(?:cn|jp|tw|ru|th))?)$", "i"));
            return b ?
                b[0] : a
        }
        var g = window,
            i = g.document,
            n = g.screen,
            h = g.navigator,
            j = +new Date,
            k, p = [{
                key: "di",
                value: function (a) {
                    return e(a.id)
                }
            }, {
                key: "dcb",
                value: function () {
                    return "BAIDU_DUP_define"
                }
            }, {
                key: "dtm",
                value: function () {
                    return "BAIDU_DUP_SETJSONADSLOT"
                }
            }, {
                key: "dbv",
                value: function () {
                    var a = b.U;
                    return a.qa ? "1" : a.V ? "2" : "0"
                }
            }, {
                key: "dci",
                value: function (b) {
                    for (var c = "-1", d = {
                            fill: "0",
                            fillOnePiece: "1",
                            fillAsync: "2",
                            preload: "3"
                        }, e = 0; e < b.id.length; e++) {
                        var f = a.s(b.id[e]);
                        if (f) {
                            var f = f.stack,
                                i = f.length;
                            if (1 <= i) {
                                c = d[f[i - 1]];
                                break
                            }
                        }
                    }
                    return c
                }
            }, {
                key: "dri",
                value: function (a) {
                    return e(a.id, 1)
                }
            }, {
                key: "dis",
                value: function () {
                    var a = 0;
                    b.a.l(g) && (a += 1);
                    b.a.k(g, g.top) && (a += 2);
                    var c = b.style.r(),
                        d = b.style.q();
                    if (40 > c || 10 > d) a += 4;
                    return a
                }
            }, {
                key: "dai",
                value: function (b) {
                    return a.w(b.id).join(",")
                }
            }, {
                key: "dds",
                value: function () {
                    var a = b.data.g("dds");
                    return b.lang.O(a)
                }
            }, {
                key: "drs",
                value: function () {
                    var a = {
                        uninitialized: 0,
                        loading: 1,
                        loaded: 2,
                        interactive: 3,
                        complete: 4
                    };
                    try {
                        return a[i.readyState]
                    } catch (b) {
                        return -1
                    }
                }
            }, {
                key: "dvi",
                value: function () {
                    return "7o"
                }
            }, {
                key: "ltu",
                p: m,
                value: function () {
                    for (var a = 0, c = g, d = 0, e = 0; 10 > a++ && b.a.l(c) && !b.a.k(c, c.parent);) {
                        d = b.style.r(c);
                        e = b.style.q(c);
                        if (400 < d && 120 < e) break;
                        c = c.parent
                    }
                    d = "";
                    return d = 10 <= a || b.a.k(c, c.parent) ? c.document.referrer || c.location.href : c.location.href
                }
            }, {
                key: "liu",
                p: m,
                value: function () {
                    return b.a.l(g) ? i.URL : ""
                }
            }, {
                key: "ltr",
                p: m,
                value: function () {
                    for (var a = 0, c = g; 10 > a++ && b.a.l(c) && !b.a.k(c, c.parent);) c = c.parent;
                    a = "";
                    try {
                        a = c.opener ? c.opener.document.location.referrer : ""
                    } catch (d) {}
                    return a || c.document.referrer
                }
            }, {
                key: "lcr",
                p: m,
                value: function () {
                    var a = i.referrer,
                        c = a.replace(/^https?:\/\//, ""),
                        c = c.split("/")[0],
                        c = c.split(":")[0],
                        c = f(c),
                        d = f(),
                        e = b.cookie.get("BAIDU_DUP_lcr") || b.cookie.get("BAIDU_CLB_REFER", m);
                    if (e && d === c) return e;
                    return d !== c ? (b.cookie.set("BAIDU_DUP_lcr", a, {
                        domain: d
                    }), a) : ""
                }
            }, {
                key: "ps",
                value: function (b) {
                    return a.z(b.id).join(",")
                }
            }, {
                key: "psr",
                value: function () {
                    return [n.width, n.height].join("x")
                }
            }, {
                key: "par",
                value: function () {
                    return [n.availWidth, n.availHeight].join("x")
                }
            }, {
                key: "pcs",
                value: function () {
                    return [b.style.r(),
                        b.style.q()].join("x")
                }
            }, {
                key: "pss",
                value: function () {
                    return [b.style.ea(), b.style.da()].join("x")
                }
            }, {
                key: "pis",
                value: function () {
                    return (b.a.l(g) ? [b.style.r(), b.style.q()] : [-1, -1]).join("x")
                }
            }, {
                key: "cfv",
                value: function () {
                    var a = 0;
                    if (h.plugins && h.mimeTypes.length) {
                        var b = h.plugins["Shockwave Flash"];
                        b && b.description && (a = b.description.replace(/([a-zA-Z]|\s)+/, "").replace(/(\s)+r/, ".") + ".0")
                    } else if (g.ActiveXObject && !g.opera)
                        for (b = 10; 2 <= b; b--) try {
                            var c = new ActiveXObject("ShockwaveFlash.ShockwaveFlash." + b);
                            c && (a = c.GetVariable("$version").replace(/WIN/g, "").replace(/,/g, "."))
                        } catch (d) {}
                    return parseInt(a, 10)
                }
            }, {
                key: "ccd",
                value: function () {
                    return n.colorDepth || 0
                }
            }, {
                key: "chi",
                value: function () {
                    return g.history.length || 0
                }
            }, {
                key: "cja",
                value: function () {
                    return h.javaEnabled().toString()
                }
            }, {
                key: "cpl",
                value: function () {
                    return h.plugins.length || 0
                }
            }, {
                key: "cmi",
                value: function () {
                    return h.mimeTypes.length || 0
                }
            }, {
                key: "cce",
                value: function () {
                    return h.cookieEnabled || 0
                }
            }, {
                key: "col",
                value: function () {
                    return (h.language || h.browserLanguage ||
                        h.systemLanguage).replace(/[^a-zA-Z0-9\-]/g, "")
                }
            }, {
                key: "cec",
                value: function () {
                    return (i.characterSet ? i.characterSet : i.charset) || ""
                }
            }, {
                key: "cdo",
                value: function () {
                    var a = window.orientation;
                    a === l && (a = -1);
                    return a
                }
            }, {
                key: "tsr",
                value: function () {
                    var a = 0,
                        b = +new Date;
                    j && (a = b - j);
                    return a
                }
            }, {
                key: "tlm",
                value: function () {
                    return Date.parse(i.lastModified) / 1E3
                }
            }, {
                key: "tcn",
                value: function () {
                    return Math.round(+new Date / 1E3)
                }
            }, {
                key: "tpr",
                value: function (a) {
                    var a = a && a.max_age ? a.max_age : 24E4,
                        b = +new Date;
                    k ? b - k >= a && (k = b) :
                        k = b;
                    return k || ""
                }
            }, {
                key: "_preview",
                value: function (a) {
                    return d.fa(e(a.id))
                }
            }, {
                key: "baidu_id",
                value: function () {
                    return b.cookie.get("BAIDUID")
                }
            }, {
                key: "_orientation",
                value: function () {
                    return c.ba()
                }
            }];
        return {
            get: function (a, b) {
                for (var c = [], d = 0, e = p.length; d < e; d++) {
                    var f;
                    try {
                        var i = p[d],
                            h = i.key,
                            g = i.p,
                            j = i.value,
                            j = "function" === typeof j ? j(a) : j,
                            j = g ? encodeURIComponent(j) : j;
                        if (b && b === h) return j;
                        f = h && 0 !== h.indexOf("_") ? h + "=" + j : j
                    } catch (k) {
                        f = encodeURIComponent(k.toString()), f = f.slice(0, 100)
                    }
                    f && c.push(f)
                }
                c = c.join("&");
                return c.slice(0, 2048)
            }
        }
    });
    R("request", ["param", "slot", "util"], function (a, d, c) {
        R("request!", [], {
            name2url: function (b) {
                return "http://cb.baidu.com/ecom?" + a.get({
                    id: b.split(",")
                })
            }
        });
        R("batch!", [], {
            name2url: function (b) {
                return "http://cb.baidu.com/ecom?" + a.get({
                    id: b.split(",")
                })
            }
        });
        return {
            send: function (a, e, f) {
                if (!a || !e || f === l) return q;
                var g = [];
                if ("array" !== c.lang.b(a)) d.m(a, "request"), g = ["request!" + a];
                else {
                    for (g = 0; g < a.length; g++) d.m(a[g], "request");
                    g = 1 === a.length ? ["request!" + a[0]] : ["batch!" + a.join(",")]
                }
                Q(g, e, f);
                return m
            }
        }
    });
    R("control", ["slot", "request", "preview", "util"], function (a, d, c, b) {
        function e(c, d, e) {
            var f = d.deps,
                g = d.data,
                p = a.J(c);
            e && !p ? a.h(c, "HolderNotFound") : f && (0 > f[0].indexOf("clb/") && a.m(c, "finish"), Q(f, function (d) {
                if ("object" === b.lang.b(g)) {
                    g.id = c;
                    if (d.hasOwnProperty("validate")) try {
                        var e = d.validate(g);
                        e !== m && b.log.C({
                            data: {
                                type: e || "ResponseError",
                                errorPainter: f[0],
                                id: c,
                                slotType: g._stype,
                                materialType: g._isMlt,
                                html: !! g._html
                            }
                        })
                    } catch (h) {
                        a.h(c, "validateException")
                    }
                    if (d.hasOwnProperty("render")) try {
                        a.m(c, "render"),
                        d.render(g, p)
                    } catch (n) {
                        a.h(c, "RenderException")
                    } else a.h(c, "RenderNotFound")
                } else a.h(c, "ResponseFormatError")
            }, e))
        }

        function f(b, c, f) {
            if (!b) return q;
            var f = f || "",
                g = a.add(b),
                b = g.ids[0] || g.preloadIds[0];
            if (!b) return q;
            var k = a.W(b, c);
            a.v(b, c);
            a.create(b, c, f);
            g.ids.length ? d.send(b, function (c) {
                a.D(b, c);
                e(b, c, k)
            }, k) : g.preloadIds.length && (c = a.s(b).response, e(b, c, k));
            return m
        }

        function g(b) {
            for (var c = 0, d = b + "_" + c; 0 !== a.w([d])[0];) {
                var e = a.s(d);
                if ((e = e && e.response) && 0 === e.deps[0].indexOf("clb/")) {
                    var f = e.data,
                        e = f._isMlt;
                    (0 === e && "" !== f._html || e === q && f._fxp) && a.m(d, "finish", 0)
                }
                d = b + "_" + ++c
            }
            if (b !== l && (b = (c = window.BAIDU_CLB_SLOTS_MAP) && c[b], b !== l && (e = b._isMlt, 0 === e && "" !== b._html || e === q && b._fxp))) b._done = q
        }
        window.BAIDU_CLB_prepareMoveSlot = g;
        return {
            fill: function (a) {
                return f(a, "fill")
            },
            X: function (a, b) {
                return f(a, "fillAsync", b)
            },
            ma: function () {
                function e(c) {
                    d.send(c, function (d) {
                        if ("array" === b.lang.b(d)) {
                            if (d && d.length === c.length)
                                for (var e = 0; e < c.length; e++) a.D(c[e], d[e])
                        } else "object" === b.lang.b(d) && d && 1 === c.length &&
                            a.D(c[0], d)
                    }, q)
                }
                var f = b.lang.i(arguments),
                    f = b.lang.unique(f),
                    g = c.g();
                if (g)
                    for (var j = 0, k = f.length; j < k; j++) f[j] == g.P && (f.splice(j, 1), j--);
                for (f = a.add(f).ids; f.length;) {
                    g = f.splice(0, 16);
                    for (j = 0; j < g.length; j++) a.v(g[j], "preload");
                    e(g)
                }
            },
            na: g
        }
    });
    R("global", ["control", "biz", "util"], function (a, d, c) {
        function b(a) {
            a = a.split(".");
            return n[a[0]] + a[1]
        }

        function e() {
            var a = i.BAIDU_DUP;
            if (!("object" === c.lang.b(a) && a.push)) {
                if ("array" === c.lang.b(a) && a.length)
                    for (var b = 0; b < a.length; b++) f(a[b]);
                i.BAIDU_DUP = l;
                c.data.j("BAIDU_DUP", {
                    push: f
                });
                c.data.j("BAIDU_DUP_proxy", function (a) {
                    if (a) return function () {
                        try {
                            return f([a].concat(c.lang.i(arguments)))
                        } catch (b) {
                            0 < w-- && c.log.C({
                                data: {
                                    type: "ExecuteException",
                                    errorName: a,
                                    args: c.lang.i(arguments).join("|"),
                                    isQuirksMode: "CSS1Compat" !==
                                        document.compatMode,
                                    documentMode: document.documentMode || "",
                                    readyState: document.readyState || "",
                                    message: b.message
                                }
                            })
                        }
                    }
                });
                for (b in j) b && c.lang.A.call(j, b) && c.data.j(b, i.BAIDU_DUP_proxy(b));
                g()
            }
        }

        function f(a) {
            if ("array" !== c.lang.b(a)) return q;
            var b = a.shift();
            c.data.G("apiCount", b);
            return (b = j[b] || k[b] || q) && b.apply(o, a)
        }

        function g() {
            function a(b) {
                for (var c = 0, d = v.length; c < d; c++)
                    if (0 === b.indexOf(v[c])) return m;
                return q
            }
            c.data.j(s, function (b) {
                for (var c = 0, d = b.length; c < d; c++)
                    if (a(b[c])) return;
                Q.apply(o, arguments)
            });
            c.data.j(u, function (b, c) {
                for (var d = 0, e = c.length; d < e; d++)
                    if (a(c[d])) return;
                R.apply(o, arguments)
            })
        }
        var i = window,
            n = {
                clb: "BAIDU_CLB_",
                dan: "BAIDU_DAN_",
                nova: "cpro"
            }, h = [{
                e: ["clb.fillSlot", "clb.singleFillSlot", "clb.fillSlotWithSize"],
                f: ["fill"],
                d: a.fill
            }, {
                e: ["clb.fillSlotAsync"],
                f: ["fillAsync"],
                d: a.X
            }, {
                e: ["clb.preloadSlots"],
                f: ["preload"],
                d: a.ma
            }, {
                e: ["clb.prepareMoveSlot"],
                f: ["prepareMove"],
                d: a.na
            }, {
                e: ["clb.addOrientation"],
                f: ["addOrientation"],
                d: d.H
            }, {
                e: ["clb.addOrientationOnce"],
                f: ["addOrientationOnce"],
                d: d.S
            }, {
                e: ["clb.setOrientationOnce"],
                f: ["setOrientationOnce"],
                d: d.ra
            }, {
                e: ["clb.setConfig"],
                f: ["putConfig"],
                d: c.data.pa
            }, {
                e: ["clb.addSlot", "clb.enableAllSlots", "clb.SETHTMLSLOT"],
                f: [],
                d: c.lang.M
            }],
            h = function (a) {
                for (var c = {}, d = {}, e = 0; e < a.length; e++) {
                    for (var f = a[e], g = f.e, i = f.f, f = f.d; g.length;) c[b(g.shift())] = f;
                    for (; i.length;) d[i.shift()] = f
                }
                return {
                    ka: c,
                    oa: d
                }
            }(h),
            j = h.ka,
            k = h.oa;
        return {
            ga: function () {
                var f = c.data.K(b("clb.ORIENTATIONS"));
                if (f)
                    for (var g in f) Object.prototype.hasOwnProperty.call(f, g) && d.H(g,
                        f[g]);
                a.fill(c.data.K(b("clb.SLOT_ID")));
                e()
            }
        }
    });
    R("logService", ["util/lang", "util/event"], function (a, d) {
        d.bind(window, "load", function () {
            Q(["detect"], a.M, m)
        })
    });
    R("fingerprint", ["util/storage", "util/event", "util/browser"], function (a, d, c) {
        var b = window,
            e = q;
        c.u ? 7 <= c.u && (e = m) : a.T() && (e = m);
        e && d.bind(b, "load", function () {
            var a = b.document,
                c = a.body,
                d = a.createElement("div");
            d.id = "BAIDU_DUP_fp_wrapper";
            d.style.position = "absolute";
            d.style.left = "-1px";
            d.style.bottom = "-1px";
            d.style.zIndex = 0;
            d.style.width = 0;
            d.style.height = 0;
            d.style.overflow = "hidden";
            d.style.visibility = "hidden";
            d.style.display = "none";
            a = a.createElement("iframe");
            a.id = "BAIDU_DUP_fp_iframe";
            a.src = "http://pos.baidu.com/wh/o.htm";
            a.style.width = 0;
            a.style.height = 0;
            a.style.visibility = "hidden";
            a.style.display = "none";
            try {
                d.insertBefore(a, d.firstChild), c && c.insertBefore(d, c.firstChild)
            } catch (e) {}
        })
    });
    Q(["global"], function (a) {
        a.ga()
    });
    Q(["logService"]);
    Q(["fingerprint"]);
})();
window.BAIDU_DUP_define("detect", ["api"], function (f) {
    function g(a) {
        a.url = "";
        a.host = window.location.hostname;
        a.from = "DUP";
        f.sendLog({
            data: a,
            a: "now"
        })
    }
    try {
        setTimeout(function () {
            var a = f.getSlots(),
                d;
            for (d in a) {
                var b = a[d],
                    c = b.response,
                    e = !1;
                if ("object" !== f.getType(c)) e = !0;
                else {
                    var e = !0,
                        h;
                    for (h in c)
                        if (Object.prototype.hasOwnProperty.call(c, h)) {
                            e = !1;
                            break
                        }
                }
                var i = b.status,
                    b = b.stack;
                e ? g({
                    type: "preload" === b[0] ? "preloadFail" : "loadFail",
                    id: d
                }) : !i.render && !i.finish && g({
                    type: "renderFail",
                    id: d,
                    error: "preload" ===
                        b[0] ? "PreloadNotFilled" : "NotFilled",
                    empty: !(!c.data || !c.data._html)
                })
            }
        }, 0)
    } catch (j) {}
});